﻿Public Class BookedOnlinePage
    Public bookingCodeTextBox As TextBox
    Public bookingCode As Label
    Public panel As Panel
    Public nextButton As Button
    Public backButton As Button

    Public Sub BookedOnlineClicked()

        panel = New Windows.Forms.Panel
        panel.Name = "bOPanel"
        panel.Size = New System.Drawing.Size(800, 500)
        panel.Location = New System.Drawing.Point(0, 0)
        panel.BackgroundImage = Image.FromFile _
            (System.Environment.GetFolderPath _
            (System.Environment.SpecialFolder.Personal) _
            & "\bckgrnd.png")

        bookingCode = New Windows.Forms.Label
        bookingCode.Name = "bookingCode"
        bookingCode.Location = New System.Drawing.Point(10, 10)
        bookingCode.Size = New System.Drawing.Size(100, 20)
        bookingCode.Text = "Booking Code: "
        bookingCode.BackColor = Color.Transparent

        bookingCodeTextBox = New Windows.Forms.TextBox
        bookingCodeTextBox.Name = "bookingCodeTextBox"
        bookingCodeTextBox.Location = New System.Drawing.Point(110, 10)
        bookingCodeTextBox.Size = New System.Drawing.Size(100, 20)
        bookingCodeTextBox.TabIndex = 0

        nextButton = New Windows.Forms.Button
        nextButton.Name = "nextButton"
        nextButton.Location = New System.Drawing.Point(500, 325)
        nextButton.Size = New System.Drawing.Size(125, 125)
        nextButton.Text = "Next"
        nextButton.BackColor = Color.White

        backButton = New Windows.Forms.Button
        backButton.Name = "backButton"
        backButton.Location = New System.Drawing.Point(645, 325)
        backButton.Size = New System.Drawing.Size(125, 125)
        backButton.Text = "Back to Main Menu"
        backButton.BackColor = Color.White

        AddHandler nextButton.Click, AddressOf nextButton_Click
        AddHandler backButton.Click, AddressOf backButton_Click

        panel.Controls.Add(bookingCode)
        panel.Controls.Add(bookingCodeTextBox)
        panel.Controls.Add(backButton)
        panel.Controls.Add(nextButton)
        Form1.Controls.Add(panel)
    End Sub
    Private Sub nextButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
        Dim mp As New MapPage()
        mp.ShowMap()
        mp.panel.BringToFront()

    End Sub
    Private Sub backButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
        panel.SendToBack()

    End Sub
End Class
